package com.moyun.model.po.dict;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.moyun.model.common.CommonFieldEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;

/**
 * <p>
 * 字典明细表
 * </p>
 *
 * @author yangbx
 * @since 2022-06-18
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("sys_dict_item")
@ApiModel(value = "SysDictItem对象", description = "字典明细表")
public class SysDictItem extends CommonFieldEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty("字典表id (sys_dict 表 主键id)")
    @TableField("dict_id")
    @NotEmpty(message = "字典类型id不能为空")
    private String dictId;

    @ApiModelProperty("前端 label值 (显示值)")
    @TableField("label")
    @NotEmpty(message = "字典项label值不能为空.前端 label值 (显示值)")
    private String label;

    @ApiModelProperty("前端 value值 (代码值)")
    @TableField("value")
    @NotEmpty(message = "字典项value值不能为空.前端 value (显示值)")
    private String value;

    @ApiModelProperty("字典类型")
    @TableField("type")
    @NotEmpty(message = "字典类型不能为空")
    private String type;

    @ApiModelProperty("描述")
    @TableField("description")
    private String description;

    @ApiModelProperty("排序")
    @TableField("sort")
    private String sort;

    @TableField("is_delete")
    @TableLogic
    private String isDelete;


}
